package com.chrray.position.mapper.position;
import com.chrray.position.mapper.position.base.SysUserBaseMapper;
import com.chrray.position.entity.position.SysUser;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

/**
 *系统用户表 数据访问
 @author lm
 */
public interface SysUserMapper extends Mapper<SysUser>, MySqlMapper<SysUser>,SysUserBaseMapper{

    /**
     * 登录
     * @param account
     * @param password
     * @return
     */
    SysUser selectByUserNameAndPassword(@Param("account") String account , @Param("password") String password);


    SysUser selectByUserName(@Param("account") String account);
    /**
     * 根据手机号查询用户
     * @param mobile
     * @return
     */
    SysUser selectByMobile(@Param("mobile") String mobile);

    /**


     /**
     * 查询用户列表
     * @param roleId
     * @param userName
     * @return
     */
    List<SysUser> listUser(@Param("roleId") Long roleId, @Param("userName") String userName);


    Integer countByRoleId(@Param("roleId")Long roleId);
}
